import base from '@/api/baseurl';
import request from '@/utils/request'

//仅查询主表信息
/**
 * 查询转移曲线信息
 * @param {*} query 
 * @returns 
 */
export function fetchListTransfercurve(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/Transfercurve/findtransfercurve',
    method: 'get',
    params: query
  })
}

//
/**
 * 查询转移曲线和转移曲线期限信息
 * @param {*} query 
 * @returns 
 */
export function findtransfercurvetest(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/Transfercurve/findtransfercurvetest',
    method: 'get',
    params: query
  })
}

//导出
/**
 * 导出信息
 * @param {*} query 
 * @returns 
 */
export function findtransfercurvederive(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/Transfercurve/findtransfercurvederive',
    method: 'get',
    params: query
  })
}


/**
 * 法人下拉框
 * @param {*} query 
 * @returns 
 */
export function fetchListuserlp(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/Transfercurve/findoneTransfercurveuserlp',
    method: 'get',
    params: query
  })
}

/**
 * 币种下拉框
 * @param {*} query 
 * @returns 
 */
export function fetchListcurr(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/Transfercurve/findoneTransfercurvecurr',
    method: 'get',
    params: query
  })
}

/**
 * 拟合曲线方式下拉框
 * @param {*} query 
 * @returns 
 */
export function findcurvetypeall(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/Transfercurve/findcurvetypeall',
    method: 'get',
    params: query
  })
}


/**
 * 单行删除
 * @param {*} query 
 * @returns 
 */
// export function deleteTransfercurve(query) {
//   return request({
//     baseURL: base.appBaseApi,
//     url: '/Transfercurve/deletetransfercurve',
//     method: 'get',
//     params: query
//   })
// }
export function deleteTransfercurve(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/newdelete/transferDeleteConditionService',
    method: 'get',
    params: query
  })
}

/**
 * 发布
 * @param {*} query 
 * @returns 
 */
export function releaseTransfercurve(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/Transfercurve/releasetransfercurve',
    method: 'get',
    params: query
  })
}
/**
 * 撤销
 * @param {*} query 
 * @returns 
 */
export function revokeTransfercurve(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/Transfercurve/revoketransfercurve',
    method: 'get',
    params: query
  })
}
/**
 * 
 * @param {*} data 
 * @returns 
 */
export function addTransfercurve(data) {
  return request({
    baseURL: base.appBaseApi,
    url: '/Transfercurve/addtransfercurve',
    method: 'post',
    data
  })
}
/**
 * 修改转移曲线
 * @param {*} data 
 * @returns 
 */
export function updateTransfercurve(data) {
  return request({
    baseURL: base.appBaseApi,
    url: '/Transfercurve/updatetransfercurve',
    method: 'post',
    data
  })
}
/**
 * 多条删除
 * @param {*} data 
 * @returns 
 */
export function batchDeleteTransfercurve(data) {
  return request({
    baseURL: base.appBaseApi,
    url: '/Transfercurve/batchdeletetransfercurve',
    method: 'post',
    data
  })
}


/**
 * 获取转移曲线的曲线编号
 * @param {*} query 
 * @returns 
 */
 export function addtf_cv_code(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/Transfercurve/addtf_cv_code',
    method: 'get',
    params: query
  })
}


/**
 * 转移曲线设置
 * @param {*} query  id,s_date,e_date  
 * @returns  
 */
 export function findTransfercurvetermlist1(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/Transfercurve/findTransfercurvetermlist1',
    method: 'get',
    params: query
  })
}


/**
 * 转移曲线期限点排序数组
 * @param {*} query  转移曲线 commonpid （主页面id)
 * @returns
 */
 export function findTransfercurvetermlist(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/BasicCurve/tforderbyterm',
    method: 'get',
    params: query
  })
}

      